package com.amit.hibernate;



import java.util.Date;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;

public class Lab34 {

	public static void main(String[] args) {
		
		
		SessionFactory sessionfactory=Chibernateutil.getfactory();
		Session session=sessionfactory.openSession();
		Transaction tx=session.beginTransaction();
		/*Request request=new Request("C-101","Loss of card",new Date());
	 
		String st=(String) session.save(request);
		System.out.println(st);*/
		
		
		Request req=(Request) session.load(Request.class, "4028818f4addebe2014addebe5760001");
		
		req.setMessage("ok ok");
		tx.commit();
		session.close();

	}

}
